xl: track size of diskws with a dedicated counter
authorWei Liu <wei.liu2@citrix.com>
Thu, 2 Feb 2017 16:16:53 +0000 (16:16 +0000)
committerWei Liu <wei.liu2@citrix.com>
Fri, 3 Feb 2017 12:02:57 +0000 (12:02 +0000)
commitffe2aae4b27ee5248fb1f33ac524290d6831cbcc
tree41f3d583b01b61ba980d869d3b6a0b3e5c988af4
parentdf4d268e35a02ae1723c71f46d1fa0f2397031d7
xl: track size of diskws with a dedicated counter

The num_disks field can change during guest lifetime. Don't use that as
the size of diskws, use a dedicated counter instead.

Also free diskws and reset diskws to NULL after disabling events so that
it will be automatically re-created when the guest reboots.

Reported-by: Fatih Acar <fatih.acar@gandi.net>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Fatih Acar <fatih.acar@gandi.net>
tools/libxl/xl_cmdimpl.c